Skip to main content

Run Your Fleet Customer Contract Import

Introduction

This will import Run Your Fleet vehicles in to ViSN, and allocate vehicles to sub-customers using the Customer Account Number field

download sample Run Your Fleet customer contract import file.

File format

Comma Separated Values - *.csv
Encoding - UTF-8

Run Your Fleet Customer Customers Import

Run Your Fleet Customer contract fieldsDescriptionMax lengthData TypeRulesMandatoryDefault ValuesExample
RegistrationVehicle Registration number10StringA-Z & 0-9 CharactersYAM10JKL
VINVehicle identification number20StringA-Z 0-9 and Special CharactersNWVWZZZ1KZAM10JKL1
Asset NumberAsset Number10StringA-Z & 0-9NASSET003
Registration DateRegistration DateNANumberDDMMYYYYN15062023
MakeMake of the vehicle50StringA-Z 0-9 and Special CharactersNVolkswagen
ModelModel of the vehicle50StringA-Z 0-9 and Special CharactersNGolf
SpecificationSpecification100StringA-Z 0-9 and Special CharactersNMatch
Fuel TypeFuel type of vehicle50StringA-Z 0-9 and Special CharactersNDiesel
Vehicle TypeType of vehicle10StringA-Z 0-9 and Special CharactersYValid vehicle types:
Car, LCV, Van, Commercial (under 3.5), Commercial (over 3.5), HGV, Motor Bike, Electric Car
Contract Start DateStart date of contractNANumberDDMMYYYYN15062023
Contract End DateEnd date of contractNANumberDDMMYYYYN15062026
Contract Mileage TermMileage of Vehicle6Number0-9N20000
CAPIDCap Id20StringA-Z 0-9 and Special CharactersNCAPID003
Argic CodeArgic Code20StringA-Z 0-9 and Special CharactersNARGIC03
ColourColour of Vehicle200StringA-Z 0-9 and Special CharactersNGrey
MOT Due DateLast date for MOTNANumberDDMMYYYYN15062027
Maintained

Only "Maintained" vehicles are imported, if the value is other than Y, then it is ignored and a log is added

NAStringY or NYY
Vehicle ProductVehicle Product50StringA-Z 0-9 and Special CharactersNFleet Managed
Service ScheduleService Schedule8Number0-9N24000
Warranty Parameter MonthsWarranty parameter months3Number0-9N48
Warranty Parameter MileageWarranty mileage6Number0-9N85000
FridgeFridgeNAStringY or NNNN
Tail LiftTail LiftNAStringY or NNNN
CraneCraneNAStringY or NNNN
Customer NameCustomer Name100Stringa-z A-Z 0-9 and Special CharactersNFord cust
Customer Account NumberCustomer Account Number used to map or create sub-customers on import50StringA-Z 0-9 and Special CharactersN00123456789
VAT NumberVAT Number15StringA-Z 0-9 and Special CharactersNGB987654321
Address 1Building Number50StringA-Z 0-9 and Special CharactersN45
Address 2Street Name100StringA-Z 0-9 and Special CharactersNChurch Road
Address 3District50StringA-Z 0-9 and Special CharactersNNorth
Address 4Town100StringA-Z 0-9 and Special CharactersNManchester
Address 5County50StringA-Z 0-9 and Special CharactersNGreater Manchester
PostcodePostcode15StringA-Z & 0-9NM11AA
SMRSMRNAStringY or NNNY
TyresTyresNAStringY or NNNY
GlassGlassNAStringY or NNNY
Accident ManagementAccident ManagementNAStringY or NNNN
BreakdownBreakdownNAStringY or NNNY
InsuranceInsuranceNAStringY or NNNN
RentalRentalNAStringY or NNNN
Cost CentreCost Centre15StringA-Z 0-9 and Special CharactersNCC003
Invoice CentreInvoice Centre15StringA-Z 0-9 and Special CharactersNINV003
Customer ContactCustomer Contact15Number0-9N07987654321
Customer NumberCustomer Number15Number0-9N00123456789
Customer EmailCustomer Email50StringStandard email formatNops@example.com
Customer Policy NotesCustomer Policy Notes700StringA-Z 0-9 and Special CharactersNPolicy notes text
Customer Recharge LimitCustomer Recharge LimitNANumber0-9N300
Customer Referral LimitCustomer Referral LimitNANumber0-9N600
Driver FirstnameDriver first name30StringA-Z 0-9 and Special CharactersNSimon
Driver LastnameDriver Last name30StringA-Z 0-9 and Special CharactersNRouse
Driver EmailDriver Email50StringStandard email formatNsimon.d@example.com
Driver NumberDriver Number11Number0-9N07987654321
Policy NumberPolicy Number25StringA-Z & 0-9 Space, Dash and hyphenNPOL-RYF003
Policy Start DatePolicy Start DateNANumberDDMMYYYYN15062023
Policy End DatePolicy End DateNANumberDDMMYYYYN15062026
Policy TermPolicy TermNANumber0-9N36
Product TypeProduct Type20StringA-Z 0-9 and Special CharactersNWR91OJ

Importing a File

Preparation

  1. Create a new branch including the Jira task number in the branch name.
  2. Delete all files in the importFiles folder.
  3. Create a folder with the current sprint number.
  4. Copy the file that needs to be imported to the created folder.
  5. Update package.json:
    • Locate the line for validate:runYourFleetCustomerContract.
    • Update --leaseId with the required lease ID.
    • Update --file with the relative path of the file.
  6. Save package.json.

Local Validation

  1. In a terminal, run npm run build.
  2. Run the validation script: npm run validate:runYourFleetCustomerContract.
  3. If validation passes without errors, push the code.

Workflow Validation

  1. Navigate to Actions in the Import Manager.
  2. Locate <Environment> - on-demand-import.
  3. Select the branch created for this import.
  4. Enter the script name as validate:runYourFleetCustomerContract.
  5. Leave the Overrides field empty.

Importing the File

  1. If the validation passes, proceed with the import.
  2. Navigate to Actions in the Import Manager.
  3. Locate <Environment> - on-demand-import.
  4. Select the branch created for this import.
  5. Enter the script name as import:runYourFleetCustomerContract.
  6. Enter --persist in the Overrides field (or --leaseId <leaseId> --persist when a specific lease is required).

Importing the File via Cloud Run

Validation scheduler setup

  1. Go to Cloud Scheduler and select CREATE JOB.
  2. Configure the Cloud Scheduler with the following parameters:
  • Name: run_your_fleet_customer_contract_import_file_validation
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • Time Zone: British Summer Time (BST)
  • Target Type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/run-your-fleet-customer-contract
  • HTTP Method: POST
  • Auth Header: Select OIDC Token
  • Service Account: cloud-run-import-customer-contract
  • Body: Include the following JSON object:
{
"leaseId": "QJKgdjS4I02sEia4yTne",
"leaseCompanyName": "Next Fleet Services",
"persist": "false",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "ryfCustomerContract.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "RUN_YOUR_FLEET_CUSTOMER_CONTRACT",
"locale": "en_GB"
}

Import scheduler setup

  1. Go to Cloud Scheduler and select CREATE JOB.
  2. Configure the Cloud Scheduler with the following parameters:
  • Name: run_your_fleet_customer_contract_import
  • Region: europe-west2
  • Frequency: 0 0 31 12 1
  • Time Zone: GMT London
  • Target Type: HTTP
  • URL: https://import-manager-36r2bu4izq-uc.a.run.app/run-your-fleet-customer-contract
  • HTTP Method: POST
  • Auth Header: Select OIDC Token
  • Service Account: cloud-run-import-customer-contract
  • Body: Include the following JSON object:
{
"leaseId": "QJKgdjS4I02sEia4yTne",
"leaseCompanyName": "Next Fleet Services",
"persist": "true",
"bucket": "biddirect-2.appspot.com",
"appDirectory": "/usr/src/app/",
"importPath": "imports/fileDrop/",
"importFileDropPath": "imports/fileDrop/",
"importFileName": "ryfCustomerContract.csv",
"email": "mailgun@digitalinnk.com",
"fatalErrorEmailToAddress": "mailgun@digitalinnk.com",
"schema": "RUN_YOUR_FLEET_CUSTOMER_CONTRACT",
"locale": "en_GB"
}

Preparation

  1. Bucket Name: biddirect-2.appspot.com (bucket name may vary across environments).
  2. File Path: Place the file in imports/fileDrop within the bucket, using the CSV file named ryfCustomerContract.csv.

Running validation

  1. Go to Cloud Scheduler.
  2. Run the run_your_fleet_customer_contract_import_file_validation job (job name may vary in different environments).

Running import

  1. Go to Cloud Scheduler.
  2. Run the run_your_fleet_customer_contract_import job (job name may vary in different environments).

Testing

  1. After running the import, verify that Run Your Fleet vehicles have been successfully imported by navigating to the ViSN customer platform.
  2. Go to Vehicle Record and search for the imported vehicle to confirm the import process was successful.
  3. Where Customer Account Number is provided, verify the vehicle is allocated to the matching sub-customer, or that a new sub-customer has been created.
Status: Pending Approval
Category: Protected
Authored By: Aditya on Sep 1, 2026
Revisions